package com.yami.shop.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yami.shop.bean.model.Order;
import com.yami.shop.bean.param.OrderParam;
import com.yami.shop.bean.vo.UnDeliveryOrderExcelVO;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @author Pineapple
 * @date 2021/7/21 15:36
 */
public interface OrderExcelService extends IService<Order> {

    /**
     * 已销售订单Excel
     *
     * @param orderParam 订单参数
     * @param response   输出流
     */
    void soldExcel(OrderParam orderParam, HttpServletResponse response);

    /**
     * 导出待发货订单
     *
     * @param orderParam 搜索参数
     * @param response   输出
     */
    void unDeliveryOrderExcel(OrderParam orderParam, HttpServletResponse response);

    /**
     * 导入待发货订单
     * @param file 文件信息
     * @param shopId 店铺id
     * @param orderList 用于发货
     * @return 错误信息或正确结果
     * @throws Exception 异常
     */
    String exportOrderExcel(MultipartFile file, Long shopId, List<UnDeliveryOrderExcelVO> orderList) throws Exception;
}
